home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / X11 / Xfuncs.h < prev    next >
C/C++ Source or Header  |  2006-04-12  |  3KB  |  93 lines

  1. /*
  2.  * $XdotOrg: xc/include/Xfuncs.h,v 1.2 2004/04/23 18:43:05 eich Exp $
  3.  * $Xorg: Xfuncs.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $
  4.  * 
  5.  * 
  6. Copyright 1990, 1998  The Open Group
  7.  
  8. Permission to use, copy, modify, distribute, and sell this software and its
  9. documentation for any purpose is hereby granted without fee, provided that
  10. the above copyright notice appear in all copies and that both that
  11. copyright notice and this permission notice appear in supporting
  12. documentation.
  13.  
  14. The above copyright notice and this permission notice shall be included in
  15. all copies or substantial portions of the Software.
  16.  
  17. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  20. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  21. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23.  
  24. Except as contained in this notice, the name of The Open Group shall not be
  25. used in advertising or otherwise to promote the sale, use or other dealings
  26. in this Software without prior written authorization from The Open Group.
  27.  *
  28.  */
  29. /* $XFree86: xc/include/Xfuncs.h,v 3.10 2002/05/31 18:45:38 dawes Exp $ */
  30.  
  31. #ifndef _XFUNCS_H_
  32. #define _XFUNCS_H_
  33.  
  34. #include <X11/Xosdefs.h>
  35.  
  36. /* the old Xfuncs.h, for pre-R6 */
  37. #if !(defined(XFree86LOADER) && defined(IN_MODULE))
  38.  
  39. #ifdef X_USEBFUNCS
  40. void bcopy();
  41. void bzero();
  42. int bcmp();
  43. #else
  44. #if defined(SYSV) && !defined(SCO325) && !defined(sun)
  45. #include <memory.h>
  46. void bcopy();
  47. #define bzero(b,len) memset(b, 0, len)
  48. #define bcmp(b1,b2,len) memcmp(b1, b2, len)
  49. #else
  50. #include <string.h>
  51. #if defined(SCO325) || defined(sun)
  52. #include <strings.h>
  53. #endif
  54. #define _XFUNCS_H_INCLUDED_STRING_H
  55. #define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
  56. #define bzero(b,len) memset(b, 0, (size_t)(len))
  57. #define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
  58. #endif
  59. #endif /* X_USEBFUNCS */
  60.  
  61. /* the new Xfuncs.h */
  62.  
  63. #if !defined(X_NOT_STDC_ENV) && (!defined(sun) || defined(SVR4))
  64. /* the ANSI C way */
  65. #ifndef _XFUNCS_H_INCLUDED_STRING_H
  66. #include <string.h>
  67. #endif
  68. #undef bzero
  69. #define bzero(b,len) memset(b,0,len)
  70. #else /* else X_NOT_STDC_ENV or SunOS 4 */
  71. #if defined(SYSV) || defined(luna) || defined(sun) || defined(__sxg__)
  72. #include <memory.h>
  73. #define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
  74. #if defined(SYSV) && defined(_XBCOPYFUNC)
  75. #undef memmove
  76. #define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len))
  77. #define _XNEEDBCOPYFUNC
  78. #endif
  79. #else /* else vanilla BSD */
  80. #define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
  81. #define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
  82. #define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len))
  83. #endif /* SYSV else */
  84. #endif /* ! X_NOT_STDC_ENV else */
  85.  
  86. #if defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4))
  87. #define atexit(f) on_exit(f, 0)
  88. #endif
  89.  
  90. #endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
  91.  
  92. #endif /* _XFUNCS_H_ */
  93.